package com.hhh.demo.sx.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author hhh
 * @since 2021-12-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String username;

    private String password;

    private String name;

    /**
     * 性别字段，1表示男，2表示女，0表示未知
     */
    private Integer sex;

    /**
     * 插入格式
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    /**
     * 返回格式
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    private Integer age;


}
